]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: Don't change text color when entering the overview or lockscreen
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 1 Mar 2021 09:21:58 +0000 (10:21 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 9 Mar 2021 13:15:09 +0000 (13:15 +0000)
With the introduction of the transparent panel in the overview, we
started making the panel text/icon color slightly brighter in the
overview and on the lockscreen to ensure best contrast. Now
unfortunately, setting the text color incurred a relayout of the
underlying ClutterText actor (fixed with
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1750), and
setting the icon color causes the icon texture to get regenerated
(fixed with
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/932).
Regenerating the icon texture will replace the icon actor, which also
causes a relayout.

This relayout of the panel has been measured to add at least 1
millisecond (the numbers fluctuated a lot) to about 5 ms it takes to
layout the first frame when showing the overview.

Since https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/932 is
unlikely to land this cycle, this commit proposes a different solution:
Simply don't use a different color for text in the overview. To avoid
issues with contrast in the overview, make the default color slightly
brighter and change it from #ccc to #ddd.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1733>

data/theme/gnome-shell-sass/widgets/_panel.scss

index 966fb6c77e5e430a796653eb0fcc694df99c9136..bf7e37db6a6aed137fd038df3a8ea68eacfe7df0 100644 (file)
@@ -3,7 +3,7 @@
 
 $panel_corner_radius: $base_border_radius+1;
 $panel_bg_color: #000;
-$panel_fg_color: #ccc;
+$panel_fg_color: #ddd;
 $panel_height: 2.2em;
 $panel_transition_duration: 250ms; // same as the overview transition duration
 
@@ -99,8 +99,6 @@ $panel_transition_duration: 250ms; // same as the overview transition duration
   &.login-screen,
   &:overview {
     .panel-button {
-      color: lighten($fg_color, 3%);
-
       &:hover, &:active, &:overview, &:focus, &:checked {
         box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.15);
 
@@ -139,4 +137,4 @@ $panel_transition_duration: 250ms; // same as the overview transition duration
 #appMenu .panel-status-menu-box {
   padding: 0 $base_padding;
   spacing: $base_spacing;
-}
\ No newline at end of file
+}